<!-- 用户 》 账号 -->

<template>
  <div>
    <MajorTitle title="账号信息" />

    <EasyRow class="flex">
      <ShowPhoto label="头像" bind="photo" noLabel row3 width="240" flex0 required />

      <EasyRow class="flex1">
        <ShowText label="登录账号" bind="account" :max="20" quar3 />
        <ShowSwitch label="状态" bind="status" word2 quar />
        <ShowTimeRange label="有效期限" bind="activeTime, expireTime" />
        <ShowTime label="生效时间" bind="activeTime" half />
        <ShowTime label="失效时间" bind="expireTime" half />
      </EasyRow>
    </EasyRow>

    <EasyRow>
      <!-- 先以 row.roleId 进行字典转换，为空再取 role.roleName 值，防止删除该角色后无法显示历史的名称 -->
      <ShowDict label="关联角色" bind="roleId, roleName" third :dict="role_selectDict" />
      <ShowDictMulti label="多角色" bind="rolesIdList, rolesNameList" third2 :dict="role_selectDict" />
    </EasyRow>
  </div>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'UserAccount',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb(), CORE.mixSelect('role', 'role_')],
}
</script>
